<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddBankCardToUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->string('bank_abbr')->nullable()->after('alipay_city');
            $table->string('bank_name')->nullable()->after('alipay_city');
            $table->string('cert_number')->nullable()->after('alipay_city');
            $table->string('real_name')->nullable()->after('alipay_city');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
           $table->dropColumn(['bank_abbr','bank_name','cert_number','real_name']);
        });
    }
}
